import {createStore, applyMiddleware} from 'redux'

import thunk from 'redux-thunk'

import rootReducers from './reducers'

// 该store创建需要一个reducer,reducer必须是个方法（只能传入一个reducers（多个使用combineReducers合并）
export default createStore(
    rootReducers,
    applyMiddleware(thunk) // 如果有多个applyMiddleware(thunk,n,x) 异步action，手动dispath
    )